< previous page page_968 next page >

Page 968
Day 10
Answers to Day 10 Quiz
1. The chief advantage of using the Data Control is that you can quickly build a Visual Basic database application without the use of much code. The disadvantages of using the Data Control include the following:
e7ae6bd512ad4c3583017fcda52f57ae.gif
· The project will be more difficult to maintain.
e7ae6bd512ad4c3583017fcda52f57ae.gif
· Data entry forms will not be as easily utilized in other database applications.
2. The chief advantage of using code to build Visual Basic data entry forms is that you have complete control of the process. Code can also be used in other Visual Basic projects to quickly build forms.
3. The Find method most resembles the SQL WHERE clause.
4. The Seek method can be used only on Recordsets opened as tables. Seek cannot be used on Dynasets or Snapshots.
5. The four Move methods that can be applied to the Recordset object are MoveFirst, MovePrevious, MoveNext, and MoveLast.
6. The FindFirst method starts its search from the beginning of the Recordset. The FindLast method starts its search from the end of the Recordset.
7. You use the Bookmark to remember a specific location in a dataset.
8. The Seek method is the fastest way to locate a record in a dataset.
9. You create a control array in Visual Basic by copying and pasting a control on a form and answering Yes when prompted to create a control array by Visual Basic.
10. You must invoke the Edit or AddNew method prior to writing to a dataset with the Update method.
Answers to Day 10 Exercise
Perform the following steps to complete the addition of the ZipCity form:
1. Open Visdata and create the new table ZipCity. Add a field for ZIP code (Zip) and for city (City).
2. Modify the menu on the Company Master form by adding mnuListZip with a caption of &Zip/City.
3. Add the following code to the mnuListZip_Click event:
Private Sub mnuListZip_Click()

    'Open the ZipCity form
    frmZipCity.Show 1

End Sub

 
< previous page page_968 next page >

If you like this book, buy it!